//
//  MTNavigationController.m
//  MeToo
//
//  Created by 俊松何 on 2018/7/3.
//  Copyright © 2018年 tianxie. All rights reserved.
//

#import "MTNavigationController.h"

@interface MTNavigationController ()


@end

@implementation MTNavigationController

+ (void)initialize {
//        UINavigationBar *bar = [UINavigationBar appearance];
//    //初始化设置
//        [bar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor],
//                                  NSFontAttributeName:[UIFont systemFontOfSize:18]}];
//        // 隐藏导航栏下面的黑线
//        [bar setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
//        bar.shadowImage = [[UIImage alloc] init];
//        [bar lt_setBackgroundColor:navgationBarColor];
//        bar.backgroundColor = navgationBarColor;
    
//      [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
}



- (void)viewDidLoad {
    [super viewDidLoad];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}


//push的时候判断到子控制器的数量。当大于零时隐藏BottomBar 也就是UITabBarController 的tababar
-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    if(self.viewControllers.count > 0){
        viewController.hidesBottomBarWhenPushed = YES;
        //中间按钮隐藏
    }
    [super pushViewController:viewController animated:animated];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
